package homeWork.day03;

import java.util.ArrayList;
import java.util.List;

/**
 * 生成10个0-100之间的不重复的随机数,并输出
 * @author Xiloer
 *
 */
public class Test03 {
    public static void main(String[] args) {
        List<Integer>list=new ArrayList<>();
        while (list.size()<=10){
            int num=(int)(Math.random()*100);
            if (list.contains(num)){
                continue;
            }else {
                list.add(num);
                System.out.println(num);
            }
        }
        System.out.println(list);
    }
}
